//
//  UIViewController+GQHPermission.h
//  Xanthium
//
//  Created by GuanQinghao on 04/05/2018.
//  Copyright © 2018 GuanQinghao. All rights reserved.
//

#import <UIKit/UIKit.h>

/// 用户类型
typedef NS_ENUM(NSInteger, GQHUserType) {
    
    GQHUserTypeDefault,
    GQHUserTypeDriver,
    GQHUserTypeOwner,
    GQHUserTypeShipper,
    GQHUserTypeEnterprise
};

/// 用户权限
typedef NS_ENUM(NSInteger, GQHAccessPermissionType) {
    
    GQHAccessPermissionTypeNone,
    GQHAccessPermissionTypeJunior,
    GQHAccessPermissionTypeAdvanced,
    GQHAccessPermissionTypeDefault
};


@interface UIViewController (GQHPermission)

/// 检测用户类型
- (GQHUserType)qh_checkUserType;
/// 检测用户权限
- (GQHAccessPermissionType)qh_checkAccessPermissionType;
/// 检测用户访问权限
- (void)qh_checkAccessPermissionType:(GQHAccessPermissionType)accessPermissionType allowed:(void(^)(void))allowedBlock unallowed:(void(^)(void))unallowedBlock;

/// 司机提交基本信息
- (void)qh_submitDriverProfile;
/// 司机提交认证信息
- (void)qh_submitDriverAuthorizedInformation;
/// 货主提交认证信息
- (void)qh_submitOwnerAuthorizedInformation;
/// 物流企业提交认证信息
- (void)qh_submitEnterpriseAuthorizedInformation;

/// 查看认证信息
- (void)qh_checkAuthorizedInformation;

@end
